import request from '@/utils/request'

// 查询报价单列表
export function listQuotation(query) {
  return request({
    url: '/function/quotation/listPage',
    method: 'get',
    params: query
  })
}


// 查询报价单详情
export function getQuotation(id) {
  return request({
    url: '/function/quotation/' + id,
    method: 'get'
  })
}

// 新增报价单
export function addQuotation(data) {
  return request({
    url: '/function/quotation',
    method: 'post',
    data: data
  })
}

// 修改报价单
export function updateQuotation(data) {
  return request({
    url: '/function/quotation',
    method: 'put',
    data: data
  })
}

// 删除报价单
export function delQuotation(id) {
  return request({
    url: '/function/quotation/' + id,
    method: 'delete'
  })
}

// 新增报价单
export function addQuotationItem(data) {
  return request({
    url: '/function/quotationItem/add',
    method: 'post',
    data: data
  })
}

// 修改报价单
export function updateQuotationItem(data) {
  return request({
    url: '/function/quotationItem',
    method: 'put',
    data: data
  })
}
// 查询报价单详情
export function getQuotationItems(query) {
  return request({
    url: '/function/quotationItem/tabulate/',
    method: 'get',
    params: query
  })
}
